package com.cskaoyan.javase.oop1._11static._4exercise;
/**
 * 
 * @since 09:17
 * @author wuguidong@cskaoyan.onaliyun.com
 */
public class Demo {
    public static void main(String[] args) {
        // 注意不要同时放开两个new语句，避免互相影响
        // debug语句一，可以进入查看age的赋值过程
        // Person p = new Person(18);
        // Person p2 = new Person();
        // debug语句二，进入查看nationality赋值过程
        Person p2 = new Person("中国");
    }
}
class Person {
    int age = 10;
    static String nationality = "美国"; //类加载

    public Person(int age) {
        this.age = age;
    }


    public Person() {
    }

    public Person(String nationality) {
        Person.nationality = nationality; //创建对象
    }
}